package com.redis.bloom.filter.mapstruct;


import com.redis.bloom.filter.data.vo.resp.OrderSearchRespVO;
import com.redis.bloom.filter.model.TbOrder;
import jdk.nashorn.internal.ir.annotations.Ignore;
import org.mapstruct.BeanMapping;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;

/**
 * 订单类copy对象
 *
 * @author chen
 * @date 2024年03月03日 9:54
 */
@Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface TbOrderCopyMapper{

    TbOrderCopyMapper INSTANCE = Mappers.getMapper(TbOrderCopyMapper.class);

    @BeanMapping(ignoreByDefault = true)
    @Mappings({
            @Mapping(source = "orderNo", target = "orderNo"),
            @Mapping(source = "orderTime", target = "orderTime"),
            @Mapping(source = "orderBy", target = "orderBy")
    })
    OrderSearchRespVO createOrderSearchRespVO(TbOrder tbOrder);
}
